using System.Collections.Generic;
using SharpArch.Core.DomainModel;

namespace AgileBoard.Core
{
    public class State : Entity
    {
        public State()
        {
            Stories = new List<Story>();
        }

        public virtual string Label { get; set; }

        public virtual int OrderIndex { get; set; }

        public virtual IList<Story> Stories { get; set; }

        public virtual Iteration Iteration { get; set; }

        public virtual Project Project { get; set; }

        public virtual void AddStory(Story story)
        {
            Stories.Add(story);
            story.State = this;
        }

        public virtual void RemoveStory(Story story)
        {
            Stories.Remove(story);
            story.State = null;
        }
    }
}